package com.gitee.simons.common.config;

import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.context.ApplicationListener;

public class MediaroomEnvironmentListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> {

	@Override
	public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
		event.getEnvironment().getPropertySources().addLast(new RandomServerPortPropertySource());
	}
}
